package com.liveinstars.api.im;

import com.liveinstars.api.im.vo.UserVO;
import com.onepiece.shipelves.common.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient("im")
public interface IMUserApiService {

	@GetMapping("/user/getUser")
	String getUserAndUpdate(@RequestParam(value = "userId", defaultValue = "") Long userId,
							@RequestParam(value = "needUpdate", defaultValue = "true") Boolean needUpdate);

	@GetMapping("/user/getUsers")
	String getUsersAndUpdate(@RequestParam(value = "userIds", defaultValue = "") String userIds,
							@RequestParam(value = "needUpdate", defaultValue = "true") Boolean needUpdate);

	@GetMapping("/user/getMyTempRelation")
	String getMyTempRelation(@RequestParam(value = "userId", defaultValue = "") Long userId
							 );

	@GetMapping("/user/addFriends")
	String addFriends(@RequestParam(value = "userId", defaultValue = "") Long userId,
					  @RequestParam(value = "friendsId", defaultValue = "") Long friendsId,
					  @RequestParam(value = "requestMsg", defaultValue = "") String requestMsg);

	@GetMapping("/user/deleteFriends")
	String deleteFriends(@RequestParam(value = "userId", defaultValue = "") Long userId,
					  @RequestParam(value = "friendsId", defaultValue = "") Long friendsId);

	@GetMapping("/user/dealWithTodo")
	String dealWithTodo(@RequestParam(value = "userId", defaultValue = "") Long userId,
							  @RequestParam(value = "todoId", defaultValue = "") Long todoId,
							  @RequestParam(value = "argeeOrNot", defaultValue = "") Boolean argeeOrNot,
						@RequestParam(value = "handleMsg", defaultValue = "") String handMsg);

	@GetMapping("/user/shieldUser")
	String shieldUser(@RequestParam(value = "userId", defaultValue = "") Long userId,
							@RequestParam(value = "toId", defaultValue = "") Long toId);

	@GetMapping("/user/remarkUser")
	String remarkUser(@RequestParam(value = "userId", defaultValue = "") Long userId,
					  @RequestParam(value = "toId", defaultValue = "") Long toId,
					  @RequestParam(value = "remark", defaultValue = "") String remark);

	@GetMapping("/user/iplist")
	String iplist();

	@GetMapping("/user/getRecommendUsers")
    Result<List<UserVO>> getRecommendUsers(@RequestParam(value = "userId", defaultValue = "") Long userId);

	@GetMapping("/user/getRelateUser")
	String getRelateUserJson(@RequestParam(value = "userId", defaultValue = "") Long userId);

	@GetMapping("/user/isFriend")
	Result<Boolean> isFriend(@RequestParam(value = "userId", defaultValue = "") Long userId,
							  @RequestParam(value = "myId", defaultValue = "") Long myId);

	@GetMapping("/user/isShield")
	Result<Boolean> isShield(@RequestParam(value = "userId", defaultValue = "") Long userId,
							  @RequestParam(value = "myId", defaultValue = "") Long myId);

	@GetMapping("/user/getRemarkName")
	Result<String> getRemarkName(@RequestParam(value = "userId", defaultValue = "") Long userId,
							  @RequestParam(value = "myId", defaultValue = "") Long myId);

	@GetMapping("/user/getServiceUserList")
	Result<List<UserVO>> listServiceUser();
}
